import http from '../utils/request'
export const getSearch = (pageNo) => {
  return http.request({
    method: 'get',
    url: `/search?keywords= ${pageNo}`
  })
}

export const getCorrelation = (id) => {
  return http.request({
    method: 'get',
    url: `/related/playlist?id=${id}`
  })
}

//热搜
export const getHotsearch = () => {
  return http.request({
    method: 'get',
    url: `/search/hot/detail`
  })
}


export const geSinger = (pageNo) => {
  return http.request({
    method: 'get',
    url: `/search/suggest?keywords= ${pageNo}`
  })
}

//获取歌曲详情
export const getMusicInfo = (id) => {
  return http.request({
    method: 'get',
    url: `/song/detail?ids=${id}`
  })
}

//或取歌手的详情
export const getSingerInfo = (id) => {
  return http.request({
    method: 'get',
    url: `/artists?id=${id}`
  })
}
//歌手热门歌单
export const getSingerhot = (id) => {
  return http.request({
    method: 'get',
    url: `/artist/top/song?id=${id}`
  })
}


//歌曲播放的地址  (传歌曲id)
export const getSongurl = (id) => {
  return http.request({
    method: 'get',
    url: `/song/url?id=${id}`
  })
}


